#include <memory>
#include "udp_server.hpp"

using namespace ns_server;

static void usage(std::string proc) {
    std::cout << "Usage:\n\t" << proc << "port\n" << std::endl;
}

int main(int argc, char* argv[]) {
    if (argc != 2) {
        usage(argv[0]);
        exit(USAGE_ERR);
    }
    uint16_t port = atoi(argv[1]);
    std::unique_ptr<Udp_Server> usvr(new Udp_Server(port));
    usvr->Start();
    return 0;
}